//############################################################
// FILE:    Svpwm_dq.h
//############################################################

#ifndef  Svpwm_dq_H
#define  Svpwm_dq_H

#include "stm32f10x.h"
#include "IQ_math.h"

typedef struct 	{ 
	        int32_t Ualpha; 			// Input:   alpha-axis
				  int32_t  Ubeta;			// Input:   beta-axis
				  int32_t  Ta;				// Output:  phase-a
				  int32_t  Tb;				// Output:  phase-b
				  int32_t  Tc;				// Output:  phase-c
				  int32_t  tmp1;			// Variable: temp
				  int32_t  tmp2;			// Variable: temp
				  int32_t  tmp3;			// Variable: temp
				  uint16_t VecSector;		// Space vector sector
				} SVPWM , *p_SVPWM ;


#define SVPWM_DEFAULTS  { 0,0,0,0,0,0,0,0,0}

void  SVPWM_Cale(p_SVPWM pV);

#endif /* Svpwm_dq*/
